import request from '@/plugins/axios'

// 获取商品列表
export function fetchProductMenuTree(lazy, parentId) {
    return request({
        url: '/api/sysmenu/tree',
        method: 'get',
        params: {lazy: lazy, parentId: parentId}
    })
}

export function fetchProductoms(obj) {
    return request({
        url: '/api/productoms',
        method: 'post',
        data: obj
    })
}
// 通过id查询
export function fetchId(id) {
    return request({
        url: '/api/productoms/' + id,
        method: 'get',
    })
}
// 上架
export function putUnShelve(obj) {
    return request({
      url: '/api/productoms/'+ obj.proId +'/'+ obj.proStatus,
      method: 'put',
    })
}

export function fetchMenuList(id) {
    return request({
        url: '/api/productauthoms/page',
        method: 'get',
        params: {proId:id}
    })
}